import React, { createContext, useContext } from "react"

const RefContext = createContext({
    name: 'iphone',
    type: '手机',
    size: 256
})

export const RefProvider = ({ children }) => {
    return <RefContext.Provider
        value={{
            name: 'iphone',
            type: '手机',
            size: 256
        }}
    >
        {children}
    </RefContext.Provider>
}
export const useRefContext = () => {
    const context = useContext(RefContext)
    return context
}

export default RefContext